<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::group(function () {
    Route::get('node', 'rbac.Node/index');
    Route::post('node/create', 'rbac.Node/create');
    Route::post('node/update', 'rbac.Node/update');
    Route::post('node/status', 'rbac.Node/status');

    Route::get('users', 'rbac.Users/index');
    Route::get('users/info', 'rbac.Users/info');
    Route::get('users/menu-node', 'rbac.Users/menuNode');
    Route::post('users/create', 'rbac.Users/create');
    Route::post('users/update', 'rbac.Users/update');
    Route::post('users/status', 'rbac.Users/status');
    Route::post('users/reset-password', 'rbac.Users/resetPassword');
    Route::post('users/reset-my-password', 'rbac.Users/resetMyPassword');

    Route::get('role', 'rbac.Role/index');
    Route::get('role/select', 'rbac.Role/select');
    Route::post('role/create', 'rbac.Role/create');
    Route::post('role/update', 'rbac.Role/update');
    Route::post('role/status', 'rbac.Role/status');
    Route::post('role/node', 'rbac.Role/node');

    Route::get('/home/keep', 'Index/keep');
})->middleware([
    \app\common\middleware\BackstageTokenMiddleware::class
]);
